import java.util.Arrays;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-14
 * Time:18:00
 */
public class main2 {
    public static void sqort(int[] array) {
        for(int i=0;i< array.length-1;i++)
        {
            for(int c=0;c< array.length-i-1;c++)
            {
                if(array[c]>array[c+1])
                {
                array[c]=array[c]^array[c+1];
                array[c+1]=array[c]^array[c+1];
                array[c]=array[c]^array[c+1];
            }
            }
        }

    }
    public static void main(String[] args) {
        int[] array=new int[]{1,3,2,4,5,6,7,8,9};
        sqort(array);
        System.out.println(Arrays.toString(array));
    }
}
